home *** CD-ROM | disk | FTP | other *** search
/ European Smalltalk User Group 2004 September / esugcd.iso / Dolphin5 / Dolphin Smalltalk Value Edition 5.1.msi / Data1.cab / RandomVBClient.frm1 < prev    next >
Text File  |  2003-01-27  |  4KB  |  147 lines

  1. VERSION 5.00
  2. Begin VB.Form Random 
  3.    Caption         =   "Dolphin Random Number Generator Client"
  4.    ClientHeight    =   3675
  5.    ClientLeft      =   60
  6.    ClientTop       =   315
  7.    ClientWidth     =   5820
  8.    Icon            =   "RandomVBClient.frx":0000
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   3675
  11.    ScaleWidth      =   5820
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.Frame Frame1 
  14.       Caption         =   "Properties"
  15.       Height          =   2295
  16.       Left            =   360
  17.       TabIndex        =   2
  18.       Top             =   1080
  19.       Width           =   5175
  20.       Begin VB.TextBox Seed 
  21.          Height          =   375
  22.          Left            =   1440
  23.          TabIndex        =   12
  24.          Top             =   1620
  25.          Width           =   1215
  26.       End
  27.       Begin VB.TextBox UpperBound 
  28.          Height          =   375
  29.          Left            =   1440
  30.          TabIndex        =   11
  31.          Top             =   1020
  32.          Width           =   1215
  33.       End
  34.       Begin VB.CommandButton Command2 
  35.          Caption         =   "Set Seed"
  36.          Height          =   495
  37.          Left            =   3000
  38.          TabIndex        =   9
  39.          Top             =   1560
  40.          Width           =   1815
  41.       End
  42.       Begin VB.CommandButton SetUpperBound 
  43.          Caption         =   "Set Upper Bound"
  44.          Height          =   495
  45.          Left            =   3000
  46.          TabIndex        =   8
  47.          Top             =   960
  48.          Width           =   1815
  49.       End
  50.       Begin VB.CommandButton SetLowerBound 
  51.          Caption         =   "Set Lower Bound"
  52.          Height          =   495
  53.          Left            =   3000
  54.          TabIndex        =   6
  55.          Top             =   360
  56.          Width           =   1815
  57.       End
  58.       Begin VB.TextBox LowerBound 
  59.          Height          =   375
  60.          Left            =   1440
  61.          TabIndex        =   4
  62.          Top             =   420
  63.          Width           =   1215
  64.       End
  65.       Begin VB.Label Label4 
  66.          Alignment       =   1  'Right Justify
  67.          Caption         =   "Seed:"
  68.          Height          =   255
  69.          Left            =   120
  70.          TabIndex        =   10
  71.          Top             =   1680
  72.          Width           =   1215
  73.       End
  74.       Begin VB.Label Label2 
  75.          Alignment       =   1  'Right Justify
  76.          Caption         =   "Upper Bound"
  77.          Height          =   255
  78.          Left            =   240
  79.          TabIndex        =   7
  80.          Top             =   1080
  81.          Width           =   1095
  82.       End
  83.       Begin VB.Label Label1 
  84.          Alignment       =   1  'Right Justify
  85.          Caption         =   "Lower Bound"
  86.          Height          =   255
  87.          Left            =   120
  88.          TabIndex        =   5
  89.          Top             =   480
  90.          Width           =   1095
  91.       End
  92.       Begin VB.Label Label3 
  93.          Caption         =   "Configuration"
  94.          Height          =   255
  95.          Left            =   0
  96.          TabIndex        =   3
  97.          Top             =   0
  98.          Width           =   1095
  99.       End
  100.    End
  101.    Begin VB.TextBox Text1 
  102.       Height          =   375
  103.       Left            =   480
  104.       TabIndex        =   1
  105.       Top             =   240
  106.       Width           =   1695
  107.    End
  108.    Begin VB.CommandButton Command1 
  109.       Caption         =   "Next"
  110.       Height          =   495
  111.       Left            =   2400
  112.       TabIndex        =   0
  113.       Top             =   240
  114.       Width           =   1575
  115.    End
  116. End
  117. Attribute VB_Name = "Random"
  118. Attribute VB_GlobalNameSpace = False
  119. Attribute VB_Creatable = False
  120. Attribute VB_PredeclaredId = True
  121. Attribute VB_Exposed = False
  122. Dim R As New RANDOMLib.RandomStream
  123.  
  124. Private Sub Command1_Click()
  125.     Text1 = R.Next
  126.     Seed = R.Seed
  127. End Sub
  128.  
  129. Private Sub Command2_Click()
  130.     R.Seed = Seed
  131. End Sub
  132.  
  133. Private Sub Form_Load()
  134.     LowerBound = R.LowerBound
  135.     UpperBound = R.UpperBound
  136.     Seed = R.Seed
  137. End Sub
  138.  
  139.  
  140. Private Sub SetLowerBound_Click()
  141.     R.LowerBound = LowerBound
  142. End Sub
  143.  
  144. Private Sub SetUpperBound_Click()
  145.     R.UpperBound = UpperBound
  146. End Sub
  147.